from sqlalchemy import INTEGER, Column, Integer, String, text
from sqlalchemy.dialects.mssql import TINYINT

from models.base_model import Base


class User(Base):
    __tablename__ = 'user'
    id = Column(Integer, primary_key=True)
    username = Column(String(50), unique=True, nullable=False)
    password = Column(String(50), nullable=False)
    address = Column(String(50), nullable=False)
    age = Column(Integer, nullable=False)
    create_time = Column(INTEGER())
    last_update_time = Column(INTEGER())
    is_delete = Column(TINYINT(), server_default=text("'0'"))